package com.dbq.fast.business.coupons;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import java.util.List;

/**
 */

public class PagerAdapter extends FragmentPagerAdapter {

    private final List<Fragment> list;
    private String[] titles;

    public PagerAdapter(FragmentManager fm, List<Fragment> list,String[] titles) {
        super(fm);
        this.list = list;
        this.titles  = titles;
    }

    @Override
    public android.support.v4.app.Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}
